package hu.myai.model.sp;

import hu.myai.model.db.AxHistory;
import hu.myai.model.graph.DirectionNode;
import hu.myai.util.Constans;

import java.util.Date;

public class HighStockPivot extends StockPivot {

	private static DirectionNode directionNode = (DirectionNode) Constans.bf_direction.getBean("direction_top");

	public HighStockPivot(Date location, double value) {
		super(location, value, directionNode);
	}

	public HighStockPivot(AxHistory history) {
		super(history.getDate(), history.getHigh(), directionNode);
	};

	@Override
	public void setStockPivot(AxHistory history) {
		this.value = history.getLow();
		this.location = history.getDate();
		this.direction = DirectionNode.LOCAL_HIGH;
	}

}
